<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <title>开通存款账户</title>
  <link rel="stylesheet" type="text/css" href="./css/api.css" />
  <link rel="stylesheet" type="text/css" href="./css/aui.css" />
  <link rel="stylesheet" type="text/css" href="./css/font-awesome.min.css" />
  <link rel="stylesheet" type="text/css" href="./css/styleold.css" />
  <script type="text/javascript" src="./script/api.js"></script>
  <script type="text/javascript" src="./script/aui-tab.js" ></script>
  <link rel="stylesheet" type="text/css" href="./css/aui-slide.css" />
  <script type="text/javascript" src="./script/aui-slide.js"></script>
  <script type="text/javascript" src="./script/base.js"></script>
  <script type="text/javascript" src="./script/jquery-3.2.0.js"></script>
  <script type="text/javascript">
    function closeFrame(){

      var win = api.pageParam;
      win = win.window;
      if (win=='licai-zhitou') {

        // api.setFrameGroupIndex({
        //   name: 'nav',
        //   index: 2,
        //   reload: true,
        // });

        api.closeFrame({
          name: 'bank'
        });

        api.closeFrame({
          name: 'open-bank'
        });

      }else if(win == 'licai-sanbiao'){
        // api.setFrameGroupIndex({
        //   name: 'nav',
        //   index: 2,
        //   reload: true,
        // });

        api.closeFrame({
          name: 'bank'
        });

        api.closeFrame({
          name: 'open-bank'
        });
      }else if(win == 'index'){

          // // 上页面刷新数据
          // var refreshUser = 'gotoUser();';
          // api.execScript({
          //   name: 'home',
          //   script: refreshUser,
          // });

          // // 成功后关闭登录页面
          // api.closeToWin({
          //   name: 'home'
          // });

          // 让上个页面关闭充值frame
          var closeFrame = 'closeBottomFrame();';
          api.execScript({
            name: 'news_region',
            // frameName: 'user',
            script: closeFrame,
          });

          api.closeFrame();

        }else{
        // // 上页面刷新数据
        // var jsFun = 'updateData();';
        // api.execScript({
        //   frameName: 'user',
        //   script: jsFun,
        // });

        // // 让上个页面关闭开通银行frame
        // var closeFrame = 'closeBottomFrame();';
        // api.execScript({
        //   name: 'home',
        //   frameName: 'user',
        //   script: closeFrame,
        // });

        var setSele = 'randomSwitchBtn(2);';
        api.execScript({
          name: 'root',
          script: setSele,
        });


      // 让上个页面关闭充值frame
      var closeFrame = 'closeBottomFrame();';
      api.execScript({
        name: 'root',
        frameName: 'user',
        script: closeFrame,
      });
      
      api.closeFrame({
       name: 'recharge-top'
     });

      api.closeFrame({
        frameName: 'open-bank'
      });


    }
  };
</script>
</head>
<body>
  <header class="aui-bar aui-bar-nav" id="topbarBank">
    <a class="aui-pull-left aui-btn" onclick="closeFrame()">
      <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title">开通存款账户</div>
  </header>
</body>
<script type="text/javascript">

</script>
</html>
